package com.system.service.impl;

import com.system.mapper.SysUserRoleMapper;
import com.system.model.SysUserRole;
import com.system.service.SysUserRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class SysUserRoleServiceImpl implements SysUserRoleService {
    @Autowired
    private  SysUserRoleMapper sysUserRoleMapper;

    @Override
    public int deleteSysUserRoleByUserId(int sysUserId) {
        int i = sysUserRoleMapper.deleteSysUserRoleByUserId(sysUserId);
        return i;
    }

    @Override
    public int addSysUserRoleBySysUserRole(SysUserRole sysUserRole) {
        int i = sysUserRoleMapper.insertSelective(sysUserRole);
        return i;
    }

    @Override
    public SysUserRole querySysUserRoleByUserId(int sysUserId) {
        SysUserRole sysUserRole_db = sysUserRoleMapper.querySysUserRoleByUserId(sysUserId);
        return sysUserRole_db;
    }
}
